#! /usr/bin/env python
#coding=utf-8

import wx
import wx.lib.agw.hyperlink as hl

ABOUT_TEXT = u'''┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│  │  │郑│重│声│明│：│　│　│　│　│　│　│　│　│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│　│　│　│　│　│　│　│　│　│　│　│　│　│　│　│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│  │  │本│软│件│不│涉│及│政│治│，│没│有│色│情│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│内│容│，│遵│守│国│家│法│律│（│包│括│宪│法│、│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│民│法│、│刑│法│、│书│法│、│公│检│法│、│基│本│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│法│、│劳│动│法│、│婚│姻│法│、│输│入│法│、│引│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│渡│法│、│担│保│法│、│商│标│法│、│专│利│法│、│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│广│告│法│、│国│际│法│、│著│作│权│法│、│吸│星│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│大│法│、│避│孕│法│、│选│举│法│、│大│奶│二│奶│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│和│谐│法│、│党│国│自│杀│法│、│今│日│说│法│、│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│台│湾│关│系│法│及│软│件│中│涉│及│或│可│能│涉│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│及│以│及│未│涉│及│之│法│，│各│地│社│会│治│安│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│综│合│管│理│条│例│等│）│。│　│　│　│　│　│　│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│　│　│　│　│　│　│　│　│　│　│　│　│　│　│　│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│  │  │对│于│他│人│使│用│本│软│件│所│产│生│的│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│一│切│后│果│，│均│与│本│软│件│作│者│无│关│。│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│　│　│　│　│　│　│　│　│　│　│　│　│　│　│　│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│  │  │本│人│不│玩│躲│猫│猫│，│不│练│俯│卧│撑│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│，│谢│绝│跨│省│追│捕│。│　│　│　│　│　│　│　│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│　│　│　│　│　│　│　│　│　│　│　│　│　│　│　│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│  │  │此│声│明│最│终│解│释│权│归│本│人│所│有│
├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤
├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
│。│　│　│　│　│　│　│　│　│　│　│　│　│　│　│
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
'''

HOMEPAGE='http://code.google.com/p/fuck-sensitive-word/'

class aboutDialog(wx.Dialog):
    def __init__(self, parent):
        wx.Dialog.__init__(self, parent, -1, u'关于')
        
        text = wx.TextCtrl(self, style = wx.TE_MULTILINE | wx.HSCROLL | wx.TE_READONLY, size=(400, 300))
        font = wx.Font(pointSize = 9, family = wx.DEFAULT, style = wx.NORMAL, weight = wx.NORMAL, face = u'宋体')
        text.SetValue(ABOUT_TEXT)
        text.SetFont(font)
        
        hyper = hl.HyperLinkCtrl(self, -1, HOMEPAGE, URL = HOMEPAGE)
        
        buttonSizer = wx.StdDialogButtonSizer()
        okBt = wx.Button(self, wx.ID_OK, u'确定')
        okBt.SetDefault()
        buttonSizer.AddButton(okBt)
        buttonSizer.Realize()
        
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(text, flag = wx.ALIGN_CENTER|wx.ALL, border = 5)
        sizer.Add(hyper, flag = wx.ALIGN_CENTER|wx.ALL, border = 5)
        sizer.Add(buttonSizer, flag = wx.ALIGN_CENTER|wx.ALL, border = 5)
        self.SetSizer(sizer)
        sizer.Fit(self)
        
        okBt.SetFocus()